<?php

function smarty_function_get_topic_subcategory ($params, &$smarty) {

  $scy_id = $params['scy_id'];

  if(isset($scy_id)){
    //Query type data
    $sql = "SELECT
              scy_name
            FROM
              zk_innoforum_subcategory
            WHERE
              scy_id = ".$scy_id;

    $column = array("name");
    $result = DBUtil::executeSQL($sql);
    $objectArray = DBUtil::marshallObjects ($result, $column);
     $smarty->assign("subcategory_name", $objectArray[0]['name']);
    //return $objectArray[0]['name'];
  }

}
